import request from '@/utils/request'

// 查询岗位列表
export function listOrder(query) {
  return request({
    url: '/ypjxc/order/list',
    method: 'get',
    params: query
  })
}

//获取供应商信息
export function getSupplier() {
  return request({
    url: '/ypjxc/order/getSupplier',
    method: 'get'
  })
}


// 查询工厂详细
export function getOrder(orderId) {
  return request({
    url: '/ypjxc/order/' + orderId,
    method: 'get'
  })
}

// 新增岗位
export function addOrder(data) {
  return request({
    url: '/ypjxc/order',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateOrder(data) {
  return request({
    url: '/ypjxc/order',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delOrder(orderIds) {
  return request({
    url: '/ypjxc/order/' + orderIds,
    method: 'delete'
  })
}

// 导出岗位
export function exportOrder(query) {
  return request({
    url: '/ypjxc/order/export',
    method: 'get',
    params: query
  })
}
